package com.develop.skwen.electricgomall.find.list.holder;

import android.media.Image;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.develop.skwen.basemodule.list.BaseHolder;
import com.develop.skwen.electricgomall.R;
import com.develop.skwen.electricgomall.find.model.FindBean;

/**
 * Created by skwen on 2018/7/8.
 */

public class FindHolder extends BaseHolder<FindBean> {

    private TextView itemName, itemTime;

    private ImageView itemImage;

    public FindHolder(View itemView) {
        super(itemView);
        itemName = findViewById(R.id.item_name);
        itemTime = findViewById(R.id.item_time);
        itemImage = findViewById(R.id.item_image);
    }

    @Override
    public void bind(@NonNull FindBean item) {

        itemName.setText(item.getTitle());

        itemTime.setText(item.getDate());

        Glide.with(itemImage)
                .load(item.getThumbnail_pic_s())
                .into(itemImage);
    }
}
